Modify the configuration of the forest identified by {id|name}
.
URL Parameters | |
---|---|
format | The format of the returned data. Can be
html , json or xml (default). If present, the
format parameter overrides the Accept header. |
Upon success, MarkLogic Server returns a status code 204 (No Content).
manage-user
rolehttp://marklogic.com/xdmp/privileges/manage
manage
role plus one of the following granular privileges:
http://marklogic.com/xdmp/privileges/admin/forest
http://marklogic.com/xdmp/privileges/admin/forest/forest-ID
Properties included in the payload replace the existing configuration of the same
property, if any. All other properties remain unchanged. Replacement applies even where
multiple property values are supported, such as replica forests. For example, if the request
includes configuration for forest-replicas
, all previously existing replica
configuration is replaced. The operation is not additive.
Note: The properties
described here are for XML payloads. In general they are the same for JSON, with the
exception that, in JSON, failover-hosts
and forest-replicas
are
expressed in singular form. For example, in JSON, failover-hosts
is instead
failover-host
and the format is: "failover-host":["hostname"]
.
Note that adding or removing a replica forest to/from a master forest will take the master forest offline.
The structure of the modifiable properties is as follows:
The following properties are immutable: database
, host
,
data-directory
, large-data-directory
, and
fast-data-directory
.
If database replication is configured such that the connect-forests-by-name
property is false, then forest-level replication can be changed with the
database-replication
properties of the forests. Specify
foreign replicas on the replica forests and foreign-master
on the master forest.
database
forest-name
enabled
host
data-directory
large-data-directory
fast-data-directory
fast-data-max-size
updates-allowed
availability
rebalancer-enable
range
This is a complex structure with the following children:
lower-bound
upper-bound
partition-number
failover-enable
failover-hosts
This is a complex structure with the following children:
failover-host
forest-backups
This is a complex structure with the following children:
forest-backup
This is a complex structure with the following children:
backup-id
backup-enabled
backup-directory
backup-type
backup-period
backup-month-day
backup-days
This is a complex structure with the following children:
backup-day
backup-start-date
backup-start-time
backup-timestamp
forest-replicas
This is a complex structure with the following children:
forest-replica
This is a complex structure with the following children:
host
replica-name
data-directory
large-data-directory
fast-data-directory
database-replication
This is a complex structure with the following children:
foreign-replicas
This is a complex structure with the following children:
foreign-replica
This is a complex structure with the following children:
foreign-cluster-name
foreign-database-name
foreign-forest-name
foreign-master
This is a complex structure with the following children:
foreign-cluster-name
foreign-database-name
foreign-forest-name
$ cat ./forest-properties.xml ==> <forest-properties xmlns="http://marklogic.com/manage"> <enabled>false</enabled> </forest-properties> $ cat ./forest-properties.json ==> { "enabled": true } $ curl --anyauth --user user:password -X PUT -d @./forest-properties.xml \ -i -H "Content-type: application/xml" \ http://localhost:8002/manage/v2/forests/example-1/properties ==> The enabled property of the forest named example-1 is set to false. All other properties are unchanged. MarkLogic Server responds with output similar to the following: HTTP/1.1 204 No Content Server: MarkLogic Content-Length: 0 Connection: Keep-Alive Keep-Alive: timeout=5